﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace ClearDir
{
    public class Program
    {
        public static bool autoDelet = false;

        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        public static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //Encoder.example();
            //DependentFiles.deletCurExe();

            //ProcessTool.test();

            if (args != null && args.Length > 0)
            {
                foreach (string file in args)
                {
                    if (file.Equals("AUTODELET")) autoDelet = true;
                    else ClearTool.ClearDelet(file);
                }
                if (autoDelet) DependentFiles.deletCurExe();
            }
            else
            {
                Application.Run(new ClearTool_Form());
            }
        }
    }
}
